﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //Random ran = new Random();
            //for (int i = 0; i < 10; i++)
            //{
            //    do
            //    { }
            //    j = ran.Next(10);

            //}
            int j = 0;
            ArrayList iList = new ArrayList();
            for (int i = 0; i < 10; i++)
            {
                Random rd = new Random();
                do
                {
                    j = rd.Next(1, 11);
                }
                while (iList.Contains(j));
                iList.Add(j);
            }
            foreach (int iRand in iList)
            {
                Console.WriteLine(iRand);
            }
            Random a = new Random();
            int b = a.Next(0,500);//生成一个0到500的随机数
            float c = (float)(b * 0.01);//乘以0.01就变成随机的俩位小数了
            Console.WriteLine(c);
            int d = a.Next(400, 700);
            float e = (float)(d * 0.01);
            Console.WriteLine(e);

        }
        public static void Text1()
        {
            int[] arr = new int[10];
            ArrayList iList = new ArrayList();
            for (int i = 1; i < 10; i++) iList.Add(i);
            Random rd = new Random();
            for (int i = 0; i <arr.Length; i++)
            {
                int index = rd.Next(0, iList.Count);
                arr[i] = (Int32)iList[index];
                iList.RemoveAt(index);
            }
            
            

        }
    }
}
